package com.pointmi.loyaltydao;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;

import com.pointmi.customeraccountdao.Customer;

@Entity
public class Loyalty implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column
	private String customerId;
	
	@Column
	private int loyaltyPoint;
	
	@Column
	private double amountEquivalent;
	
	@Column 
	private Date loyaltyExpiryDate;
	
	@OneToOne
	@PrimaryKeyJoinColumn
	private Customer customer;
	
	public void setCustomerId(String customerId)
	{
		this.customerId = customerId;
	}
	
	public String getCustomerId()
	{
		return customerId;
	}
	
	public void setLoyaltyPoint(int loyaltyPoint)
	{
		this.loyaltyPoint = loyaltyPoint;
	}
	
	public int getLoyaltyPoint()
	{
		return loyaltyPoint;
	}
	
	public void setAmountEquivalent(double amountEquivalent)
	{
		this.amountEquivalent = amountEquivalent;
	}
	
	public double getAmountEquivalent()
	{
		return amountEquivalent;
	}
	
	public void setLoyaltyExpiryDate(Date loyaltyExpiryDate)
	{
		this.loyaltyExpiryDate = loyaltyExpiryDate;
	}
	
	public Date getLoyaltyExpiryDate()
	{
		return loyaltyExpiryDate;
	}
	
	public Customer getCustomer()
	{
		return customer;
	}
}
